package com.webtair.dump4j.writer;

import java.io.PrintStream;

import com.webtair.dump4j.objectdump.ObjectDump;

public class WriterPrintStream implements Writer{
	private PrintStream stream;
	public WriterPrintStream(){
		this.stream = System.out;
	}
	public WriterPrintStream(PrintStream stream){
		this.stream = stream;
	}
	public void writeDump(ObjectDump dump) {
		String next = dump.firstBlock();
		while(next != null){
			stream.println(next);
			next = dump.nextBlock();
		}
		//stream.println(dump.getStringRepresentation());
	}

}
